<template>
<div class="bPop" v-if="isShow">
    <div class="bPop-con">
        <div class="bPopClose" @click="isShow=false">
            <i class="el-icon-close"></i>
        </div>
        <div class="bPop-c">
            <div class="bPop-c-l">
                我们使用cookies来分析和改善我们的服务，以对内容、广告和您的数字化体验进行提升和个性化。您使用我们网站的相关信息我们也会分享给我们的社交媒体、广告和分析合作伙伴。通过选择“全部接受”、关闭横幅说明或继续浏览我们的网站，您同意我们使用cookies。
                <!-- 点击查看 <a href="" target="_blank" class="link">隐私政策</a> -->
            </div>
            <div class="bPop-c-r">
                <span class="btn" @click="accept">全部接受</span>
            </div>
        </div>
    </div>
</div>
</template>

<script>
export default {
    data() {
        return {
            isShow: true
        }
    },
    mounted() {
        if(this.$cookies.get('privacy')==1){
            this.isShow=false;
        }
    },
    methods:{
        accept(){
            this.$cookies.set('privacy',1)
            this.isShow=false
        }
    }
}
</script>

<style lang="scss" scoped>
.bPop {
    background-color: rgba(0, 0, 0, 0.6);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999999;
    padding: 10px 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, .8);
    box-sizing: border-box;
}

.bPop .link {
    font-weight: bold;
    white-space: nowrap;
}

.bPop-c {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bPop-c-l {
    width: 80%;
    flex: 0 0 80%;
}

.bPop-c-r {
    width: 20%;
    flex: 0 0 20%;
}

.bPop-c-r {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bPop .btn {
    height: 32px;
    width: 80px;
    line-height: 32px;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    float: right;
    background-color: #4BAA75;
    padding: 0;
    text-decoration: none;
}

.bPopClose {
    position: fixed;
    bottom: 15px;
    right: 10px;
    z-index: 99999999;
    cursor: pointer;

    .el-icon-close {
        color: #fff;
        font-size: 20px;
    }
}

@media (max-width:767px) {
    .bPop {

        padding: 10px;
    }

    .bPopClose {
        bottom: 80px;
    }

    .bPop-c-l {
        width: 70%;
        flex: 0 0 70%;
        font-size: 12px;
    }

    .bPop-c {
        flex-direction: column;
        align-items: flex-start;
    }

    .bPop-c-l {
        width: 90%;
        flex: 0 0 90%;
        font-size: 12px;
        margin-bottom: 10px;
        word-break: break-word;
        text-align: justify;
    }

    .bPop-c-r {
        width: 100%;
        flex: 0 0 100%;
    }

    .bPop .btn {
        height: 24px;
        width: 70px;
        line-height: 24px;
        font-size: 12px;
    }
}
</style>
